import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;




public class serveur {

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	
	{
		
		try {
			
			ServerSocket server = null;		
			Socket connectSocket;				
			String userInput;
			
			server = new ServerSocket(1030);
			
			connectSocket = server.accept();			
				
			BufferedReader in=new BufferedReader(new InputStreamReader(connectSocket.getInputStream())); 
							
			while((userInput=in.readLine())!=null){
				
				//in=new BufferedReader(new InputStreamReader(connectSocket.getInputStream()));
				System.out.println(userInput);		
				
			}
			
			connectSocket.close(); 
			server.close(); 			
			
		} 
		
		catch (IOException e) {System.out.println(e);}	

	}
	
}
